<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>UNAS-LOG</title>
        <link type="text/css" rel="stylesheet"
              href="#{request.contextPath}/resources/css/default.css" />
        <link type="text/css" rel="stylesheet"
              href="#{request.contextPath}/resources/css/syntaxhighlighter/syntaxhighlighter.css" />


    </h:head>
    <h:body onload="dialog.show();">
        <p:growl autoUpdate="true" showDetail="true"/>
        <p:dialog header="Indentificación" modal="true" widgetVar="dialog" closable="false" closeOnEscape="false">
            <h:form>
                <div align="center">
                    <h:panelGrid columns="2">
                        <h:outputText value="Usuario:"/>
                        <p:inputText value="#{loginBean.user.nick}" required="true" label="Usuario"/>
                        
                        <h:outputText value="Password" rendered="#{loginBean.noAlumn}"/>
                        <p:password value="#{loginBean.user.password}" required="true" label="Contraseña"
                                    rendered="#{loginBean.noAlumn}"/>

                    </h:panelGrid>
                    <p:selectOneRadio value="#{loginBean.typeUser}">
                        <f:selectItem itemValue="Comisión" itemLabel="Comisión"/>
                        <f:selectItem itemValue="Practicante" itemLabel="Practicante"/>
                        
                        <p:ajax event="valueChange" listener="#{loginBean.changeView()}" update="@form"/>
                    </p:selectOneRadio>
                    <p:separator />
                    <p:commandButton value="Ingresar" icon="ui-icon-person"
                                     action="#{loginBean.logginProcess()}">
                    </p:commandButton>
                    <p:separator />

                </div>
                <p:commandLink value="Auxiliar" action="#{indexLoginBean.logOut}" />
            </h:form>
        </p:dialog>

    </h:body>
</html>